<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>联系卖家</title>
    <meta name="keywords" content="知果汇" />
    <meta name="description" content="知果汇" />
    <link rel="SHORTCUT ICON" href="_IMG_/favicon.ico" />
    <style type="text/css">
        html,body{width: 560px;height: 380px;margin: 0;padding: 0;}
        p{margin: 0;}
        .fl{float: left;}
        form{width: 520px;padding: 20px;}
        .formItem{overflow: hidden;}
        .formItem label{font-size: 14px;color: #333333;}
        .products{overflow: hidden;width: 470px;}
        .products img{width: 120px;height: 120px;float: left;}
        .products p{width: 340px;display: inline-block;float: left;padding-left: 10px;margin-bottom: 15px;}
        .productName{font-size: 14px;color: #333333;}
        .greyTag{color: #999999;font-size: 12px;width: 70px;display: inline-block;}
        .types,.services{font-size: 11px;color: #333333;}
        .prices{font-size: 14px;color: #FF4900;}
        .fillin{border: 1px solid #E5E5E5;height: 34px;line-height:34px;font-size: 14px;color: #999999;width: 428px;padding: 0 10px;}
        .commentsFill{font-size: 14px;text-indent: 0;}
        .mt10{margin-top: 10px;}
        .text_area {
            position: relative;
            width: 450px;
            margin: 8px 0;
        }
        .commentsFill{
            width: 418px;
            padding: 15px 15px 35px 15px;
            height: 100px;
            border:1px solid #E5E5E5;
            font-size: 14px;
            color: #999999;
            resize: none;
            text-indent: 2em;
            overflow-x:auto;
            overflow-y:hidden;
        }
        #titlelen {
            position: absolute;
            right: 15px;
            bottom: 10px;
        }
        #titlelen{font-size: 14px;}
    </style>
</head>
<body>
<form action="" method="post">
    <div class="formItem">
        <label class="fl" for="products">商品：</label>
        <div class="products fl" name="products">
            <img src="" alt=""/>
            <p class="productName"></p>
            <p class="priceNum"><span class="greyTag">价格</span><span class="prices"></span></p>
            <p class="types"><span class="greyTag">类型</span><span class="productType">交易类商品</span></p>
            <p class="services"><span class="greyTag">交易分类</span><span class="serviceType"></span></p>
        </div>
    </div>
    <div class="formItem mt10">
        <label class="fl" for="question" style="padding-top: 10px;">问题：</label>
        <div class="text_area fl">
            <textarea class="commentsFill" id="news_title" name="news_title" maxlength="200" placeholder="写下您的问题..." onkeyup="title_len();" onclick="title_len();"></textarea>
            <span id="titlelen">0/200</span>
        </div>
    </div>
    <input type="hidden" id="uid" name="uid">
</form>
</body>
<script src="_JS_/jquery-1.8.3.min.js"></script>
<script src="_JS_/jquery.base64.js"></script>
<script src="_JS_/jquery.cookie.js"></script>
<script src="_JS_/common.js"></script>
<script src="_P_/layer/layer.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        var url=window.location.href;
        var id = url.split("=")[1];
        if(id){
            $.ajax({
                type: "get",
                url: "{:url('api/trading/trading_detail')}",
                data: {'id': id},
                dataType: 'jsonp',
                success: function (msg) {
                    if(msg.code==200){
                        $('.productName').html(msg.data.username);
                        $('.prices').html('￥'+msg.data.store);
                        $('.serviceType').html(msg.data.category);
                        $('.products').find('img').eq(0).attr('src','/Images/tradingMarket/'+msg.data.image);
                        $('#uid').val(msg.data.uid);
                    }
                    if(msg.code==1000){
                        layer.msg('未知错误！', {icon: 51});
                    }
                }
            });
        }else{
            layer.msg('网络错误！', {icon: 51});
        }
    });

</script>
</html>
